import unittest
import day01
import os
from langchain_community.chat_models import ChatOpenAI

class MyTestCase(unittest.TestCase):
    def test_something(self):
        self.assertEqual(True, False)  # add assertion here
    def test_hello_word(self):
        day01.helloword()
    def test_getCityGoodEat(self):
        # openaiObj = openai.OpenAIClient()
        # openaiObj.getCityGoodEat()
        llm = ChatOpenAI(temperature=0.5, openai_api_key=os.environ.get('OPENAI_API_KEY'),
                           base_url='https://api.chatanywhere.tech/v1')
        response = llm.invoke('谁是中国改革开放的总设计师？')
        print(response, type(response))

if __name__ == '__main__':
    unittest.main()
